package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.TPurchaseOrderItemMapper;
import com.ruoyi.purchase.domain.TPurchaseOrderItem;
import com.ruoyi.purchase.service.ITPurchaseOrderItemService;

/**
 * 采购明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TPurchaseOrderItemServiceImpl implements ITPurchaseOrderItemService 
{
    @Autowired
    private TPurchaseOrderItemMapper tPurchaseOrderItemMapper;

    /**
     * 查询采购明细
     * 
     * @param id 采购明细主键
     * @return 采购明细
     */
    @Override
    public TPurchaseOrderItem selectTPurchaseOrderItemById(Long id)
    {
        return tPurchaseOrderItemMapper.selectTPurchaseOrderItemById(id);
    }

    /**
     * 查询采购明细列表
     * 
     * @param tPurchaseOrderItem 采购明细
     * @return 采购明细
     */
    @Override
    public List<TPurchaseOrderItem> selectTPurchaseOrderItemList(TPurchaseOrderItem tPurchaseOrderItem)
    {
        return tPurchaseOrderItemMapper.selectTPurchaseOrderItemList(tPurchaseOrderItem);
    }

    /**
     * 新增采购明细
     * 
     * @param tPurchaseOrderItem 采购明细
     * @return 结果
     */
    @Override
    public int insertTPurchaseOrderItem(TPurchaseOrderItem tPurchaseOrderItem)
    {
        return tPurchaseOrderItemMapper.insertTPurchaseOrderItem(tPurchaseOrderItem);
    }

    /**
     * 修改采购明细
     * 
     * @param tPurchaseOrderItem 采购明细
     * @return 结果
     */
    @Override
    public int updateTPurchaseOrderItem(TPurchaseOrderItem tPurchaseOrderItem)
    {
        return tPurchaseOrderItemMapper.updateTPurchaseOrderItem(tPurchaseOrderItem);
    }

    /**
     * 批量删除采购明细
     * 
     * @param ids 需要删除的采购明细主键
     * @return 结果
     */
    @Override
    public int deleteTPurchaseOrderItemByIds(Long[] ids)
    {
        return tPurchaseOrderItemMapper.deleteTPurchaseOrderItemByIds(ids);
    }

    /**
     * 删除采购明细信息
     * 
     * @param id 采购明细主键
     * @return 结果
     */
    @Override
    public int deleteTPurchaseOrderItemById(Long id)
    {
        return tPurchaseOrderItemMapper.deleteTPurchaseOrderItemById(id);
    }
}